<!DOCTYPE html>
<html>
<head>
	<title>调试oc</title>
	<style type="text/css">
		
		p{
			height: 50px;
			background-color: red;
			color: white;
			font-size: 16px;
            text-align:center;
            line-height:50px;
		}
    
        body{
            background-color: gray;
        }

	</style>
	<script type="text/javascript">
		function changeNativeButtonColor() {
            window.webkit.messageHandlers.AppModel.postMessage({"params":"我是参数"});
		}
    
        //OC调用JS改变背景色
        function changeColor(color){
            document.body.style.backgroundColor = color;
        }
	</script>
</head>
<body>

<p onclick="changeNativeButtonColor()">网页按钮</p>

</body>
</html>
